package com.hzncc.flowable_diboot.contract.entity;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.lang.Double;
import java.math.BigDecimal;

import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;


import com.diboot.core.util.D;
import com.diboot.core.entity.BaseModel;
import com.diboot.core.entity.BaseEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 合同基础信息 Entity 定义
 *
 * @author MyName
 * @version 1.0
 * @date 2024-07-12
 * Copyright © MyCorp
 */

@TableName("mdl_contract_info")
@Getter
@Setter
@Accessors(chain = true)
public class ContractInfo extends BaseModel {
    private static final long serialVersionUID = 1502453640040959407L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 合同审批ID
     */
    @NotNull(message = "合同审批ID不能为空")
    @TableField()
    private String contractAuditId;

    /**
     * 合同编码
     */
    @NotNull(message = "合同编码不能为空")
    @Length(max = 100, message = "合同编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contractCode;

    /**
     * 合同版本
     */
    @NotNull(message = "合同版本不能为空")
    @TableField()
    private Long contractVersion;

    /**
     * 客户ID
     */
    @NotNull(message = "客户ID不能为空")
    @Length(max = 100, message = "客户ID长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String customerId;

    /**
     * 是否公司模版
     */
    @NotNull(message = "是否公司模版不能为空")
    @Length(max = 100, message = "是否公司模版长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String companyTemplate;

    /**
     * 配套机床型号
     */
    @Length(max = 100, message = "配套机床型号长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String machineToolCode;

    /**
     * 签订数量
     */
    @NotNull(message = "签订数量不能为空")
    @TableField()
    private Long signedQuantity;

    /**
     * 合计金额
     */
    @NotNull(message = "合计金额不能为空")
    @TableField()
    private BigDecimal totalAmount;

    /**
     * 已收金额
     */
    @NotNull(message = "已收金额不能为空")
    @TableField()
    private BigDecimal receivedAmount;

    /**
     * 未收金额
     */
    @NotNull(message = "未收金额不能为空")
    @TableField()
    private BigDecimal outstandingAmount;

    /**
     * 合同附件
     */
    @Length(max = 100, message = "合同附件长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String contractFile;

    /**
     * 补充附件
     */
    @Length(max = 100, message = "补充附件长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String attachmentFile;

    /**
     * 补充附件说明
     */
    @Length(max = 100, message = "补充附件长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String attachmentFileDesc;

    /**
     * 币种
     */
    @TableField
    private String currency;

    /**
     * 汇率
     */
    @TableField
    private String exchangeRate;

    /**
     * 合同金额
     */
    @TableField
    private String contractAmount;

    /**
     * 合同金额（人民币）
     */
    @TableField
    private String contractAmountNuclearRmb;

    /**
     * 需方
     */
    @TableField
    private String demander;

    /**
     * 外部合同号
     */
    @TableField
    private String externalContractNo;

}